﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Company.Web.Models.NewsModels.IndexModel>" %>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="content_title">
您所在的位置:新闻
</div>
<div class="newscontent">
    <% foreach (var item in Model.News) %>
    <% { %>
    <div class="newitem">
        <a href='<%=Url.Action("detail", new { a = item.ID, l = Model.L.Lower(), @ref = Request.RawUrl }) %>'>
            <div class='newtitle <%=item.Highlight ? "hi" : "" %>'><%=item.Title %></div>
            <div class="newtime">[<%=item.AddTime.ToString("yyyy-MM-dd") %>]</div>
        </a>
    </div>
    <% } %>
</div>
<div class="pager">
<%=Html.Pager(Model.A, Model.B, 12, Model.SumCount, "a", null, "b") %>
</div>
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="StypeAndScript" runat="server">
<style type="text/css">
    .newscontent{ width:100%; text-align:center;}
    .newitem{ width:90%; height:auto; overflow:hidden; display:inline-block; margin-top:5px;}
    .newitem .newtitle{ float:left;}
    .newitem .newtime{ float:right;}
    .newitem .hi{color:Red; font-weight:bold;}
    .pager{ width:90%; text-align:center;}
</style>
</asp:Content>